#pragma once
#include "../LibDGGSBase/DGGSDefine.hpp"
#include "DGGSGeometry.hpp"

_NNU_DGGS_BEGIN
namespace Feature {

    class DGGSFeature;

    /// <summary>
    /// 格网系统中feature的class，用于管理feature的新建
    /// </summary>
    class DGGSFeatureClass 
    {
    private:
        DGGSGeometryType    _geometryType;      //几何类型
        DGGSGridType        _gridType;          //格网类型
        DGGSElementType     _elementType;       //要素类型
        int                 _level;             //层级
                        
    public:
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="level">层级</param>
        /// <param name="shapeType">几何类型</param>
        /// <param name="gridType">格网类型</param>
        /// <param name="elementType">要素类型</param>
        DGGSFeatureClass(int level, DGGSGeometryType shapeType,DGGSGridType gridType, DGGSElementType elementType = DGGSElementType::Cell);

        /// <summary>
        /// 创建feature
        /// </summary>
        /// <returns>DGGSFeature</returns>
        DGGSFeature* createFeature();      

        /// <summary>
        /// 获取几何类型
        /// </summary>
        /// <returns>DGGSGeometryType</returns>
        DGGSGeometryType getGeometryType() { return this->_geometryType; }

        /// <summary>
        /// 获取格网要素类型
        /// </summary>
        /// <returns>DGGSElementType</returns>
        DGGSElementType getElementType() { return this->_elementType; }

        /// <summary>
        /// 获取格网类型
        /// </summary>
        /// <returns>DGGSGridType</returns>
        DGGSGridType getGridType(){ return this->_gridType; }

        /// <summary>
        /// 获取层级
        /// </summary>
        /// <returns>int level</returns>
        int getLevel() const { return this->_level; }

        ~DGGSFeatureClass();
    };

}
_NNU_DGGS_END

